$(document).ready(function() {
	
	// ["Label" , "website link" , "bar color" , "bar image"]
	var social = [
	
	 ["facebook", 	"https://www.facebook.com/QLooK.bz", 			"#3B5998", "http://3.bp.blogspot.com/-0r1cN_AIhbc/VIWr1VV20MI/AAAAAAAAAKI/EnazKyTlYHc/s1600/facebook.png"],
	 ["twitter", 	"https://twitter.com/Qlook_bz","#0e76a8", "http://4.bp.blogspot.com/-MEnnvrGFiKw/VIWr2pZbegI/AAAAAAAAAKU/3NkwdrXr1ao/s1600/twitter.png"],
	 ["google+", 	"https://plus.google.com/+Qlook-Bz/", 		"#dd4b39", "http://2.bp.blogspot.com/-preKvBs5D5Y/VIWr1a42UHI/AAAAAAAAAJ8/bqYO7K6WehY/s1600/google_plus.png"],
	  ["youtube", 	"https://www.youtube.com/QLookGroup", 		"#c4302b", "http://4.bp.blogspot.com/-gzB5HCrGm08/VIWr261j7nI/AAAAAAAAAKY/7o570P4GG9g/s1600/youtube.png"],
	 ["pinterest", 	"http://www.pinterest.com/QLooK_bz/", 	"#1e477a", "http://2.bp.blogspot.com/-29ha0BchWyA/VIWr2fS_biI/AAAAAAAAAKM/QszvyVWvYnc/s1600/paypal.png"],
	  ["myspace", 		"https://myspace.com/qlook", 		"#ffd900", "http://2.bp.blogspot.com/-uJwhfaGaNTk/VIWsEUNqRyI/AAAAAAAAAKs/XNFUBN6e96k/s1600/myspace.png"],
	 ];

////////////////////////////////////////////////	
//// DO NOT EDIT ANYTHING BELOW THIS LINE! /////
////////////////////////////////////////////////
		
	$("#socialside").append('<ul class="mainul"></ul>');
	
	/// generating bars
	for(var i=0;i<social.length;i++){
	$(".mainul").append("<li>" + '<ul class="scli" style="background-color:' + social[i][2] + '">' +
						'<li>' + social[i][0] + '<img src="' + social[i][3] + '"/></li></ul></li>');
	 				}
	
	/// bar click event
	$(".scli").click(function(){
		var link = $(this).text();		
		for(var i=0;i<social.length;i++){
			if(social[i][0] == link){
				window.open(social[i][1]);
			}
		}		
	});
	
	/// mouse hover event
	$(".scli").mouseenter(function() {	
		$(this).stop(true);	
		$(this).clearQueue();
			$(this).animate({
				left : "140px"
			}, 300);
				
	});

	/// mouse out event
	$(".scli").mouseleave(function(){
		$(this).animate({
			left:"0px"
		},700,'easeOutBounce');
	});

});
